package com.example.test_demo.test;

import java.util.*;

/**
 * @program: Demo
 * @description:
 * @author: yanghua
 * @create: 2021-01-07 15:35
 **/

public class People {
    public static void main(String[] args) {
//        Map<String, Object> test = test();
//
//        for (Map.Entry<String, Object> t: test.entrySet()) {
//
//            if (t.getValue() instanceof List<?>){
//                System.out.println(t.getValue());
//                System.out.println((List)t.getValue());
//
//                for (Object o : (List<?>) t.getValue()) {
//                    System.out.println(String.class.cast(o));
//                }
//
//            }
//
//        }
//        Object obj = getObj();
//        Arrays.asList(obj);

        String s="1,2";
        List<String> list = Arrays.asList(s);
        for (int i = 0; i <list.size() ; i++) {

            System.out.println(list.get(i));
        }
    }
    public static Map<String, Object> test(){
        Map<String, Object> map = new HashMap<>();
        List<String> list = Arrays.asList("111");
        //List<String> list = new ArrayList<>();
        //list.add("11111");
        map.put("1",list);
        map.put("2","555");
        return map;
    }
    public static Object getObj() {
        List<String> list = new ArrayList<>();
        list.add("1");
        list.add("ab");
        return list;
    }
}
